<template>
	<div class="el-top-box">
		<div class="center">
			<div class="leftBox" @click="$router.push({path:'/home'})"><span>鼎慧教育云首页</span></div>
			<div class="rightBox">
				<el-row :gutter="50">
					<el-col :span="6" style="height: 10px">
<!--						<div class="search">-->
<!--							<el-input placeholder="请输入内容" v-model="input3" size="small">-->
<!--								<el-button slot="append" icon="el-icon-search"></el-button>-->
<!--							</el-input>-->
<!--						</div>-->
					</el-col>
					<el-col :span="12">
						<el-menu :router="true" :default-active="activeIndex" mode="horizontal" @select="handleSelect">
							<el-menu-item index="/home">教辅产品</el-menu-item>
							<el-menu-item index="/cart">购物车</el-menu-item>
							<el-menu-item index="/favorites">收藏夹</el-menu-item>
							<el-menu-item index="/user/userOrder" :disabled="isDisabled">我的订单</el-menu-item>
							<el-menu-item index="/home">联系客服</el-menu-item>
							<el-menu-item index="/home">我的应用</el-menu-item>
						</el-menu>
					</el-col>
					<el-col :span="6">
						<div v-if="isLogin == true" class="userInfo">
							<el-dropdown trigger="click" @command="handleCommand">
								<div class="avatar">

									<el-avatar :size="40" :src="userInfo.photo" @error="errorHandler"><img
											:src="imgUrl+userInfo.photo" />
									</el-avatar>
									<label>{{userInfo.name?userInfo.name:'用户'}}</label>
								</div>
								<el-dropdown-menu slot="dropdown">
									<el-dropdown-item command="/user">用户中心</el-dropdown-item>
									<el-dropdown-item command="logout">安全退出</el-dropdown-item>
								</el-dropdown-menu>
							</el-dropdown>

							<div class="msg">
								<i class="el-icon-bell"></i>
								<label>消息</label>
							</div>
						</div>
						<div v-else class="userInfo">
							<div class="msg">
								<label @click="goLogin()"> 登录</label>
								<span> /</span>
								<label @click="goRegister()"> 注册</label>
							</div>
						</div>
					</el-col>
				</el-row>
			</div>
		</div>
	</div>
</template>

<script src="./index.js"></script>
<style lang="scss" src="./index.scss"></style>
